Software development kit for real-time communication applications and system

ABSTRACT

A software development kit enables developers to provide real-time communications capabilities to existing software applications.

CROSS-REFERENCE TO RELATED APPLICATIONS

The present application claims the benefit of U.S. ProvisionalApplication Ser. No. 60/398,940, filed Jul. 25, 2002, titled SoftwareDevelopment Kit for Real-Time Communication Application and System.

FIELD OF THE INVENTION

The present invention relates to a real-time software development kit(SDK) and, more particularly, a real-time software development kit thatis utilized in secure instant messaging and enterprise real-timecommunications software.

BACKGROUND OF THE INVENTION

The consumer instant messaging (IM) model, which is well known inconsumer environments such as America Online, and the like, does notgenerally suit the needs of businesses. Businesses typically handle manyaspects of instant communications differently than the consumer instantmessaging user. In most cases, business users do not want add orsubscribe colleagues to “buddy” lists. Instead, business users want tosee their co-workers automatically in a comprehensive, yet wellorganized list of objects. Grouping is left to the end-user client on anad hoc in most consumer IM applications. In the business world, there isa need for groupings that follow the sophisticated tree structures ofbusiness organizations. Typical consumer IM solutions do not provide thelevel of control required by most enterprises, nor do they offersufficient security controls or centralized management of groups andprofile lists.

There has recently been developed a real-time routing architectureprovides the underlying technology building blocks for business instantmessaging and enterprise real-time communication software. Servers andclients utilize real-time routing architecture that provides a secure,two-way, real-time communications platform that may be used to build avariety of high performance custom applications. Key components in theplatform include the real-time engine featuring intelligent routing,user identification and presence, or status, virtual channels and pipes.Pipes support a variety of multi-server topologies, providing massivescalability and/or multi-office communications. The scalable presencemanagement system is capable of managing and displaying real-time statusof thousands of users, known as presence objects, without creatingnetwork bottlenecks with status updates.

SUMMARY OF THE INVENTION

Disclosed is a new instant messaging and enterprise real-timecommunication software, referred to herein as a real-time softwaredevelopment kit (SDK). The SDK of the present invention provides a setof application programming interfaces (APIs) that enables developers andbusiness partners, including system integrators, ISVs, OEMs, hardwareappliance manufacturers and ASPs, to create custom client/server andweb-based instant messaging (IM) applications based on the real-timerouting architecture disclosed herein, which provides a secure, two-wayreal-time communications platform. The SDK disclosed herein meets theneeds of organizations that have a desire to rapidly develop secure IMapplications, with the capability of scaling-up in complex enterprisenetwork environments.

The SDK supports Microsoft Visual Studio and Delphi developmenttoolsets, with certified languages including Visual Basic NET, VisualC#, and Delphi. The SDK includes COM and ActiveX Objects and Delphinative components, sample applications with source code, onlinedocumentation and development environment set-up.

The SDK of the present invention provides a fully functional, secureinstant messaging client with an easy to use interface, with a one-waysecure instant messaging application for emergency notifications andother broadcast applications, and a web-based IM interface. These can bereadily adapted to internal and customer-facing applications such asCRM, ERP, Enterprise Information Portals (EIP), web front-ends,line-of-business and legacy applications.

The enterprise server as disclosed herein provides the server componentfor the SDK Run-Time Client. The server delivers authentication,security, directory service integration, groups, profiles and othercentral management capabilities to custom client applications. Theserver supports multi-server topologies, multi-threading and symmetricmulti-processing (SMP), enabling secure IM applications for thousands ortens-of-thousands of users. In addition, it provides private routingover LAN, WANs, VPNs, NATs, proxies and firewalls. This “privaterouting” as disclosed herein provides the capability that supports thecomplex, distributed network environments found in most largeorganizations today.

The SDK of the present invention extends the real-time routingarchitecture. The SDK provides an extensible, open interface forbidirectional messaging, which supports any real-time datacommunications stream and any data type. The SDK of the presentinvention allows third-party developers to define their own data types.

Enterprise instant messaging is evolving into a viable businessproductivity tool for companies of all sizes. The core components ofpresence management, secure instant messaging and text chat providedevelopers utilizing the disclosed invention the ability to createcustom instant messaging applications. The ability to add real-timepresence to existing applications is a powerful enhancement.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram a physical network of clients and serversaccording to the present invention.

FIG. 2 is a block diagram of a real-time routing architecture accordingto the present invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

Referring now to the drawings, and first to FIG. 1, a network isdesignated generally by the numeral 11. Network 11 includesinterconnected real-time routing servers 13, which provide a real-timerouting engine, and clients 15. According to the present invention,servers 13 are connected to each other by virtual pipes. The pipesroute, secure and compress data between sub-networks. The pipes providethe custom-routing necessary to support communications over virtuallyany TCP/IP connection, as well as VPNs, gateways and firewalls. Users,through clients 15, are connected to real-time routing servers 13 byconnections. The connections may be through LANs, WANs, the Internet,RAS, Dial-up networking, VPNs, Citrix Winframe/Metaframe and WindowsTerminal Services through gateways, proxies and firewalls. Onceconnected, users immediately appear as real-time presence objects in thereal-time routing system. Servers 13 track users by the location oftheir status or presence. Servers 13 can relearn routes to usersthroughout the system in the event of physical routing failure. Network11 may be of any topology, such as ring, star, mesh or the like.

To establish communications between distributed users across variousconnections, the real-time routing system establishes virtual channelsbetween various users. Users are joined to a channel through the use ofa real-time join. All subsequent communications directed toward thechannel are directed to all joined users on the channel. The channelmechanism is efficiently designed to ensure that data is not transmittedmore than once across any pipe when directed to a channel.

The logical structure of a system according to the present invention isillustrated in FIG. 2. The real-time routing engine comprises channels,pipes and presence, described with reference to FIG. 1. Additionally,the real-time routing engine comprises security and encryption,directory integration and centralized management layered above thechannels, pipes and presence. The real-time routing engine provides aflexible, secure, manageable, proxy and firewall-friendly real-timerouting core.

The security system is designed to support a rich variety of corporatesecurity policies, by providing end-to-end encryption of all messagetraffic. The real-time engine uses a combination of security protocols.RC4 may be used as a default. However, in addition to RC4, the real-timeengine may use DES, triple-DES (128 bits), AES (256 bits) and RSA (up to512 bits). Additionally, RSA signing, certificates and authenticationmay be available. These protocols provide a wide variety of key-length,performance trade-offs and corporate security options.

Layered under the security streaming is a compression layer. Thecompression layer uses a compression format, such as zlib compressiondescribed in RFC 1950-1952, on pipes and connections, which achieves upto 4:1 compression. As will be recognized by those skilled in the art,other compression formats may by utilized.

The low-level design code at the server level preferably takes advantageof symmetrical multi-processing (SMP). Each virtual user runs on aseparate thread, and when available, these threads are distributedacross multiple CPUs within a server. SMP can be useful in the case oflarge population security alert users. In such a scenario, it is moreeconomical support a large population on one or several servers whenthere is little traffic. However, when an urgent message is distributed,SMP provides a tremendous performance boost, distributing hundreds ofmessages per second, per CPU.

Layered above the real-time routing engine is the componentarchitecture, which comprises the ESDK and the EConferencing SDK, whichwill be described in detail hereinafter. The ESDK and EConferencing SDKenable enterprise instant messaging, extranet web conferencing, andvoice and video conferencing.

The ESDK provides a rich set of tools for creating comprehensivereal-time communications applications such as instant messaging, chatand presence programs. It is designed to operate in most newerdevelopment environments such as those created by Borland and Microsoft.The ESDK is adapted to provide a presence object. The properties,methods and events of the ESDK of the present invention art disclosed asfollows.

Properties

PublicKey

{PublicKey”}{xe “TESDK:PublicKey”}

PublicKey: String;

The PublicKey holds the current public key of the client user. ThePublicKey is used in conjunction with the PrivateKey for real-timeservers that require public key encryption for encrypted communications.The server console can enable this behavior on a real-time server. Undernormal circumstances, the PublicKey and PrivateKey are automaticallycreated when they are required for encrypted communications.

The process of creating a PublicKey and PrivateKey can be timeconsuming. Subsequent client sessions can reuse the PublicKey andPrivateKey from a prior session and avoid the time required to create anew key pair. In the event that the PublicKey and PrivateKey arerequired for a client session the OnClientCertificateKeys event will betriggered.

Private Key

{xe “PrivateKey”}{xe “TESDK:PrivateKey”}

PrivateKey: String;

The PrivateKey holds the current private key of the client user. ThePrivateKey is used in conjunction with the PublicKey for real-timeservers that require public key encryption for encrypted communications.The server console can enable this behavior on a real-time server. Undernormal circumstances, the PublicKey and PrivateKey are automaticallycreated when they are required for encrypted communications.

MessageAutoClear

{xe “MessageAutoClear”}{xe “TESDK:MessageAutoClear”}

MessageAutoClear: Boolean;

The MessageAutoClear property determines how messages are retained andhandled in memory. By default, MessageAutoClear is set to TRUE andmessages are not retained in memory once they are sent and messages arenot retained in memory once they are received. When sending a messageusing the SetMessage method, the message information will be clearedfrom memory when MessageAutoClear is TRUE. Otherwise use theClearMessage and ClearMessageAll events to clear all messages frommemory.

When receiving a message, all message information must be extracted bythe client during the OnMessage event using the various GetMessagerelated methods if MessageAutoClear is TRUE. Once the OnMessage event isfinished, the resulting message is deleted from memory ifMessageAutoClear is TRUE.

MessageCompressThreshold

{“MessageCompressThreshold”}{xe “TESDK:MessageCompressThreshold”}

MessageCompressThreshold: Integer;

The MessageCompressThreshold property specifies the compressionthreshold sizes in bytes of a message. The defaultMessageCompressThreshold is 250,000 bytes. When constructing messagesand using the SetMessageBodyAsRTF method, if the body exceeds theMessageCompressThreshold it is compressed automatically. Compressionincreases the overall message creation time but can significantly reducethe size of messages with embedded graphics.

CommandAutoClear

{xe “CommandAutoClear”}{xe “TESDK:CommandAutoClear”}

CommandAutoClear: Boolean;

The CommandAutoClear property determines how commands are retained andhandled in memory. By default, CommandAutoClear is set to TRUE andcommands are not retained in memory once they are sent and commands arenot retained in memory once they are received. When sending a commandusing the SetCommand method, the command information will be clearedfrom memory when CommandAutoClear is TRUE. Otherwise use theClearCommand and ClearCommandAll events to clear all commands frommemory.

When receiving a command, all command information must be extracted bythe client during the OnCommand event using the various GetCommandrelated methods if CommandAutoClear is TRUE. Once the OnCommand event iscomplete, the command related information is cleared from memory. Tochange this behavior, set CommandAutoClear to FALSE.

Connected

{xe “Connected”}{xe “TESDK:Connected”}

property Connected: Boolean;

The Connected property is used to determine if the client hasestablished a socket connection with the real-time server. A value ofTRUE indicates a socket connection is established. A value of FALSEindicates the socket is not connected. The Connected property can beused to determine if a real-time client connection is still connected.The OnClientConnected event is used to perform initial communicationsonce a connection is established such as receiving stored messages andsending and receiving of status information for users. TheOnClientConnected event occurs after the negotiations are completed andthe real-time connection is approved. See the OnClientConnected eventfor more details.

IP

(xe “IP”}{xe “TESDK:IP}

property IP: String;

The IP property is used to specify the IP address or host name of thereal-time server. The IP property holds the IP address portion of theaddress of the real-time server for establishing a connection.

For example,

MyESDK.IP=“127.0.0.1”

MyESDK. Port=35000

MyESDK. Connect

Port

{xe “Port”}{xe “TESDK:Port”}

property Port: Integer;

The Port property is used to specify the default port of the real-timeserver. The port is the default port required for clients connecting tothe real-time server. The default port for the real-time server is TCPport 35000. The default port can be modified on a real-time server usingthe server console.

For example,

MyESDK.IP=“127.0.0.1”

MyESDK. Port 35000

MyESDK.Connect

Account

{xe “Account”}{xe “TESDK:Account”}

property Account: String;

The Account property specifies the account name used to logon to thereal-time server. The Account and Password are only required if thereal-time server has been configured for authentication using the serverconsole. The Account is the name of the user to logon to the real-timeserver. A Password must also be provided to connect to the real-timeserver. If the initial provided Account and Password are incorrect orthe account and password are not provided, the client will trigger anOnClientLogon event to request the Account and Password. Once theAccount and Password are verified, the client will trigger anOnClientUID event to provide the user identification to the client basedupon the validated Account and Password.

For example,

MyESDK.IP=“127.0.0.1”

MyESDK.Port 35000

MyESDK.Account=“Account”

MyESDK. Password=“Password”

MyESDK.Connect

Password

{xe “Password”}{xe “TESDK:Password”}

property Password: String;

The Password property specifies the password used to logon to thereal-time server. The Account and Password are only required if thereal-time server has been configured for authentication using the serverconsole. The Password is the password of the user to logon to thereal-time server. An Account must also be provided to connect to thereal-time server. If the initial provided Account and Password areincorrect or the account and password are not provided, the client willtrigger an OnClientLogon event to request the Account and Password. Oncethe Account and Password are verified, the client will trigger anOnClientUID event to provide the user identification to the client basedupon the validated Account and Password.

For example,

MyESDK. “127.0.0.1”

MyESDK. Port 35000

MyESDK.Account=‘Account’

MyESDK Password=“Password”

MyESDK.Connect

UID

{xe “UID”}{xe “TESDK:UID”}

property UID: String;

The UID is the user identification value of the client user. A UIDuniquely identifies the user to the real-time server. Each user musthave their own unique UID user identification. The UID should beconstant for each respective user and persist between each session theymaintain with the real-time server.

The UID information may be maintained in the client application orauthentication may be enabled on the real-time server so that thereal-time server maintains the UID information. To maintain the UIDwithin the client application, call CreateID at least once to generate aUID value and then retain that value in the client application. The UIDmust be assigned to the UID property before calling the Connect method.If the real-time server is maintaining the UID, enable userauthentication in the real-time server console and provide an Accountand Password when the client connects. Once the account and password areverified by the real-time server, a UID will be provided through theOnClientUID event.

Identity

{xe “Identity”}{xe “TESDK:Identity”}

property Identity: String;

The Identity is the visible displayed status name that represents theclient user. The Identity is strictly used for display purposes in thestatus or presence directory.

For example,

MyESDK.Identity=“John Smith”

VCL

{xe “VCL”}{xe “TESDK:VCL”}

property VCL: Boolean;

The VCL property is used to indicate the application is being developedin Delphi and will be using the VCL during real-time events. Thereal-time software development kit uses threads for maximum socketefficiency for events and internal processes. Since Delphi requiressynchronization of thread activity when threads access the VCL, it isnecessary to set VCL to TRUE.

For example,

MyESDK.VCL=TRUE

Set VCL to TRUE only if using Delphi and only if the Delphi applicationaccesses the VCL. Console applications and service handler applicationson Delphi typically do not access the VCL. Do not set VCL to TRUE onother development platforms as it will prevent communications fromoperating properly.

Methods

CreateID

{xe “CreateID”}{xe “TESDK:CreateID”}

function CreateID: String;

The CreateID method generates a generic ID string that can be used as auser identifier, channel identifier, command identifier or messageidentifier within the real-time platform. Under normal circumstancesthis method does not have to be called directly.

Return Values

If the method succeeds, the return value is an ID string.

If the method fails, the return value is NULL.

GetSecurity

{xe “GetSecurity”}{xe “TESDK:GetSecurity”}

function GetSecurity: String;

The GetSecurity method returns a string that identifies the currentencryption method that the real-time server is using. Possible resultsinclude RC4, RC4+RSA, DES+RSA, DES3+RSA, AES+RSA. The security policy isautomatically handled by the real-time server and is required by allconnecting clients. The real-time SDK handles all the security andencryption work automatically.

For RSA based security policies, the client will automatically generatethe PKI public and private keys required to communicate with the server.The process of creating keys can take a while, but will insure that eachcommunication session is uniquely encrypted. To avoid the time requiredto generate keys, save the public and private keys after the first timethey are created. Once created, they are retained in the PublicKey andPrivateKey properties. The keys can also be manually generated using theGetCertificateKeys method.

When the real-time client requires the public and private keys it willfire the OnClientCertificateKeys event. An application can respond bypassing the previously stored keys back to the client in this event. Ifthe application does not reply to the keys in this event, then thereal-time client will make new PKI public and private keys each timethey are required. For more information on using and retaining securitykeys, see the OnClientCertificateKeys event.

Return Values

-   -   If the method succeeds, the return value is a string        representing the security method.    -   If the method fails, the return value is the string ‘Unknown’.        GetCertificateKeys        {xe “GetCertificateKeys”}{xe “TESDK:GetCertificateKeys”}        function GetCertificateKeys: Boolean;

The GetCertificateKeys method generates a public and private key pairthat is compatible with the real-time server and stores the results inthe PublicKey and PrivateKey strings. Under normal circumstances it isnot necessary to manually create these keys. If a real-time server hasenforced a security policy that requires certificate keys, they will beautomatically generated by the real-time SDK on demand. Because the keycreation time can be time consuming, it is recommended the keys be savedthe first time they are created.

When the real-time client requires the public and private keys it willfire the OnClientCertificateKeys event. The application can respond bypassing the previously saved keys back to the client in this event. Ifthe application does not reply to the keys in this event, then thereal-time client will make new PKI public and private keys each timethey are required. For more information on using and retaining securitykeys, see the OnClientCertificateKeys event.

Return Values

If the method succeeds, the return value is TRUE.

If the method fails, the return value is FALSE.

CreateChannel

{xe “CreateChannel”}{xe “TESDK:CreateChannel”}

function CreateChannel: String;

The CreateChannel method creates a new in-memory channel record forreal-time communications. Use CreateChannel to create a custom in-memorychannel for sending and receiving any custom information using thereal-time platform. Channels are used within the real-time platform tocontrol where information is routed and which users actually receive theinformation content. It is not necessary to use channels to access thepresence, status and message features of the real-time platform.Channels are only used when creating a custom communications solution.

The real-time servers actually route across geographic boundaries inreal-time to deliver content. To add users to the communications channeluse the AddUserToChannel method. As many users may be added to a givenchannel that will participate in the communications. The channel is notactually created on the real-time server until the SetChannel method isinvoked. New users may be added to a channel at anytime by subsequentcalls to the AddUserToChannel method followed by SetChannel. Simply usethe CID previously returned by the call to CreateChannel.

Return Values

If the method succeeds, the return value is the CID string.

If the method fails, the return value is NULL.

AddUserToChannel

{xe “AddUserToChannel”}{xe “TESDK:AddUserToChannel”}

procedure AddUserToChannel (CID: String; UID: String);

The AddUserToChannel method joins a user to a given in-memory channelrecord. In order to have the join be processed by the server, call theSetChannel method. To destroy a channel and clear all the users from thechannel, call the SetChannelLeaveAll method.

Parameters

CID

A string representing the channel identifier.

UID

A string representing the user identifier.

DeleteUserFromChannel

{xe “DeleteUserFromChannel”}{xe “TESDK:DeleteUserFromChannel}

procedure DeleteUserFromChannel (CID: String; UID: String);

The DeleteUserFromChannel method removes a user from a given channelin-memory channel record. This method is only effective at removingusers from an in-memory channel record before a call to SetChannel. Todestroy a channel and clear all the users from the channel on areal-time server, call the SetChannelLeaveAll method instead.

Parameters

CID

A string representing the channel identifier.

UID

A string representing the user identifier.

SetChannel

{xe “SetChannel”}{xe “TESDK:SetChannel”}

function SetChannel (CID: String): Boolean;

The SetChannel method invokes the in-memory channel and all the usersassigned to the channel with the real-time server. To send informationor content to the channel, see the CreateCommand and its relatedmethods. Channels are used within the real-time platform to controlwhere information is routed and which users actually receive theinformation content. It is not necessary to use channels to access thepresence, status and message features of the real-time platform. Theyare only used when creating a custom communications solution. Thereal-time servers actually route across geographic boundaries inreal-time to deliver the content. To add users to the communicationsin-memory channel use the AddUserToChannel method.

Parameters

CID

A string representing the channel.

Return Values

If the method succeeds, the return value is TRUE.

If the method fails, the return value is FALSE.

SetChannelLeaveAll

{xe “SetChannelLeaveAll”}{xe “TESDK:SetChannelLeaveAll”}

function SetChannelLeaveAll(CID: String): Boolean;

The SetChannelLeaveAll method destroys the channel and removes all usersfrom the channel with the real-time server.

Parameters

CID

A string representing the channel identifier.

Return Values

If the method succeeds, the return value is TRUE.

If the method fails, the return value is FALSE.

GetChannelCount

{xe “GetChannelCount”}{xe “TESDK:GetChannelCount”}

function GetChannelCount: Integer;

The GetChannelCount method returns the total number of in-memory channelrecords that have been defined within the real-time client. Once achannel has been activated with the real-time server using SetChannel,that in-memory channel record may be cleared using either theClearChannel or ClearChannelAll methods.

Return Values

If the method succeeds, the return value is an integer channel count.

If the method fails, the return value is 0.

GetChannelCID

{xe “GetChannelCID”}{xe “TESDK:GetChannelCID”}

function GetChannelCID(Index: Integer): String;

The GetChannelCID method returns the CID associated with a givenin-memory channel based upon the in-memory channel index. To determinethe total count of channels in memory, call the GetChannelCount method.Channel indexes are relative to zero in memory. To walk the entirechannel listing in memory, start at zero and go to GetChannelCount minusone.

Parameters

Index

An integer representing the in channel index.

Return Values

If the method succeeds, the return value is the CID string.

If the method fails, the return value is NULL.

ClearChannel

{xe “ClearChannel”}{xe “TESDK:ClearChannel”}

procedure ClearChannel(CID: String);’

The ClearChannel method deletes an in-memory channel.

Parameters

CID

A string representing the channel identifier.

ClearChannelAll

{xe “ClearChannelAll”}{xe “TESDK:ClearChannelAll”}

procedure ClearChannelAll;

The ClearChannelAll method deletes all in-memory channel records.

CreateCommand

{xe “CreateCommand”}{xe “TESDK:CreateCommand”}

function CreateCommand: String;

The CreateCommand method creates a new in-memory command record forreal-time communications. Commands are sequences of data and informationthat are relayed to a channel, routed within the real-time environmentand received by the real-time client. A channel should already beestablished using the SetChannel method before sending a command usingSetCommand. For more information on channels, see the SetChannel method.

Return Values

If the method succeeds, the return value is the RID string.

If the method fails, the return value is NULL.

SetCommand

{xe “SetCommand”}{xe “TESDK:SetCommand”}

function SetCommand(RID, CID: String): Boolean;

The SetCommand method sends a custom command to the real-time server. Ifa custom command has been fully constructed and is ready to be sent tothe real-time server, call this method. Commands are constructed usingthe SetCommandString, SetCommand Integer, SetCommandBoolean,SetCommandDateTime and SetCommandStream methods. Commands are sent tochannels that have been created and already established through theSetChannel method. A command must also include a command value toidentify it to the real-time routing engine of the ESDK. Call theSetCommandCMD method to assign a command value.

Parameters

RID

A string representing the command identification value.

CID

A string representing the channel identification value.

Return Values

If the method succeeds, the return value is TRUE.

If the method fails, the return value is FALSE.

SetCommandString

{xe “SetCommandString”}{xe “TESDK:SetCommandString”}

procedure SetCommandString(RID: String; Prop: Integer; Value: String);

The SetCommand String method sets a string property of a command. Tochange a command, provide the property and a new value. Constructing acommand involves adding various details to a created command. In orderto have the command sent to the real-time server, call the SetCommandmethod.

For example,

MyESDK.SetCommandString(RID, 10000, “Hello World”)

The RID represents the command identifier that was obtained by callingthe method CreateCommand. The property value 10000 is a property that isuser defined within the command.

Parameters

RID

The command identifier of the command.

Prop

An integer representing the property.

Value

A string representing the value assigned to the property.

SetCommandInteger

{xe “SetCommandInteger”}{xe “TESDK:SetCommandInteger”}

procedure SetCommandInteger(RID: String; Prop: Integer; Value: Integer);

The SetCommand Integer method sets an integer property of a command. Tochange a command, provide the property and a new value, Constructing acommand involves adding various details to a created command. In orderto have the command sent to the real-time server, call the SetCommandmethod.

For example,

MyESDK.SetCommandInteger(R1, 001, 101)

The RID represents the command identifier that was obtained by callingthe method CreateCommand. The property value 10001 is a property that isuser defined within the command.

Parameters

RID

The command identifier of the command.

Prop

An integer representing the property.

Value

An integer representing the value assigned to the property.

SetCommand Boolean

{xe “SetCommandBoolean”}{xe “TESDK:SetCommandBoolean”}

procedure SetCommandBoolean(RID: String; Prop: Integer; Value: Boolean);

The SetCommandBoolean method sets a boolean property of a command. Tochange a command, provide the property and a new value. Constructing acommand involves adding various details to a created command. In orderto have the command sent to the real-time server, call the SetCommandmethod.

For example,

MyESDK.SetCommandBoolean(RID, 10002, FALSE)

The RID represents the command identifier that was obtained by callingthe method CreateCommand. The property value 10002 is a property that isuser defined within the command.

Parameters

RID

The command identifier of the command.

Prop

An integer representing the property.

Valve

A boolean representing the value assigned to the property.

SetCommandDateTime

{xe “SetCommandDateTime”}{xe “TESDK:SetCommandDateTime”}

procedure SetCommandDateTime(RID: String; Prop: Integer; Value:TDateTime);

The SetCommandDateTime method sets a datetime property of a command. Tochange a command, provide the property and a new value. Constructing acommand involves adding various details to a created command. In orderto have the command sent to the real-time server, call the SetCommandmethod.

For example,

MyESDK.SetCommandDateTime(RID, 10003, Now)

The RID represents the command identifier that was obtained by callingthe method CreateCommand. The property value 10003 is a property that isuser defined within the command.

Parameters

RID

The command identifier of the command.

Prop

An integer representing the property.

Value

A datetime representing the value assigned to the property.

SetCommandStream

{“SetCommandStream”}{xe “TESDK:SetCommandStream”}

procedure SetCommandStream(RID: String; Prop: Integer; Value:TMemoryStream);

The SetCommandStream method sets a stream property of a command. Tochange a command, provide the property and a new value. Constructing acommand involves adding various details to a created command. In orderto have the command sent to the real-time server, call the SetCommandmethod.

For example,

MyESDK.SetCommandStream(RID, 10004, MyStream)

The RID represents the command identifier that was obtained by callingthe method CreateCommand. The property value 10004 is a property that isuser defined within the command.

Streams are designed for compatibility with Borland developmentenvironments. For Microsoft development environments,SetCommandOleVariant may be needed instead.

Parameters

RID

The command identifier of the command.

Prop

An integer representing the property.

Value

A stream representing the value assigned to the property.

SetCommandOleVariant

{xe “SetCommandOleVariant”}{xe “TESDK:SetCommandOleVariant”}

procedure SetCommandOleVariant(RID: String; Prop: Integer; Value:OleVariant);

The SetCommandOleVariant method sets an olevariant property of acommand. To change a command, provide the property and a new value.Constructing a command involves adding various details to a createdcommand. In order to have the command sent to the real server, call theSetCommand method.

For example,

MyESDK.SetCommandOleVariant(RID, 10005, MyOleVariant)

The RID represents the command identifier that was obtained by callingthe method CreateCommand. The property value 10005 is a property that isuser defined within the command.

Parameters

RID

The command identifier of the command.

Prop

An integer representing the property.

Value

An olevariant representing the value assigned to the property.

SetCommandCMD

{xe “SetCommandCMD”}{xe “TESDK:SetCommandCMD”}

procedure SetCommandCMD(RID: String; CMD: Integer);

The SetCommandCMD assigns a command value to a command. Each commandthat is user defined must contain a command value. The command value isextracted during the OnCommand event using the GetCommandCMD method. Thecommand value is user defined by the developer to determine the type ofinformation being received. Starting user defined command values at50000 is recommended.

For example,

MyESDK.SetCommandCMD(RID, 50000)

The RID represents the command identifier that was obtained by callingthe method CreateCommand. The command value 50000 is a user definedvalue.

Parameters

RID

The command identifier of the command.

CMD

An integer representing the command value.

GetCommandString

{xe “GetCommandString”}{xe “TESDK:GetCommandString”}

function GetCommandString(RID: String; Prop: Integer): String;

The GetCommandString method gets a property string from a receivedcommand. To retrieve a string from a received command, provide the RIDof the command record and the property value of the string.

For example,

MyString=MyESDK.GetCommandString(RID, 10000)

The property value 10000 represents the user defined string. Todetermine the command value associated with the command identifier, callthe GetCommandCMD method.

Parameters

RID

A string representing the command identification value.

Prop

An integer representing the property value of the string.

Return Values

If the method succeeds, the return value is the string value of thespecified property.

If the method fails, the return value is NULL.

GetCommandInteger

{xe “GetCommandInteger”}{xe “TESDK:GetCommandInteger”

function GetCommandInteger(RID: String; Prop: Integer): Integer;

The GetCommandInteger method gets a property integer from a receivedcommand. To retrieve an integer from a received command, provide the RIDof the command record and the property value of the integer.

For example,

MyInteger=MyESDK.GetCommandInteger(RID, 10001)

The property value 10001 represents the user defined integer. Todetermine the command value associated with the command identifier, callthe GetCommandCMD method.

Parameters

RID

A string representing the command identification value.

Prop

An integer representing the property value of the integer.

Return Values

If the method succeeds, the return value is the integer value of thespecified property.

If the method fails, the return value is 0.

GetCommandBoolean

{xe “GetCommandBoolean”}{“TESDK:GetCommandBoolean”}

function GetCommandBoolean(RID: String; Prop: Integer): Boolean;

The GetCommandBoolean method gets a property boolean from a receivedcommand. To retrieve a boolean from a received command, provide the RIDof the command record and the property value of the boolean.

For example,

MyBool=MyESDK.GetCommandBoolean(RID, 10002)

The property value 10002 represents the user defined boolean. Todetermine the command value associated with the command identifier, callthe GetCommandCMD method.

Parameters

RID

A string representing the command identification value.

Prop

An integer representing the property value of the boolean.

Return Values

If the method succeeds, the return value is the boolean value of thespecified property.

If the method fails, the return value is FALSE.

GetCommandDateTime

{xe “GetCommandDateTime”}{xe “TESDK:GetCommandDateTime”}

function GetCommandDateTime(RID: String; Prop: Integer): TDateTime;

The GetCommandDateTime method gets a property datetime from a receivedcommand. To retrieve a datetime from a received command, provide the RIDof the command record and the property value of the datetime.

For example,

MyDateTime=MyESDK.GetCommandDateTime(RID, 10003)

The property value 10003 represents the user defined datetime. Todetermine the command value associated with the command identifier, callthe GetCommandCMD method.

Parameters

RID

A string representing the command identification value.

Prop

An integer representing the property value of the datetime.

Return Values

If the method succeeds, the return value is the datetime value of thespecified property.

If the method fails, the return value is 0.

GetCommandStream

{xe “GetCommandStream}{xe “TESDK:GetCommandStream”}

function GetCommandStream(RID: String; Prop: Integer): TMemoryStream;

The GetCommandStream method gets a property stream from a receivedcommand. To retrieve a stream from a received command, provide the RIDof the command record and the property value of the stream.

For example,

MyStream=MyESDK.GetCommandStream(RID, 10004)

The property value 10004 represents the user defined stream. Todetermine the command value associated with the command identifier, callthe GetCommandCMD method.

Streams are designed for compatibility with Borland developmentenvironments. For Microsoft development environments,GetCommandOleVariant may be needed instead.

Parameters

A string representing the command identification value.

Prop

An integer representing the property value of the stream.

Return Values

If the method succeeds, the return value is the stream value of thespecified property.

If the method fails, the return value is NIL.

GetCommandOleVariant

{xe “GetCommandOleVariant”}{xe “TESDK:GetCommandOleVariant”}

function GetCommandOleVariant(RID: String; Prop: Integer): OleVariant;

The GetCommandOleVariant method gets a property olevariant from areceived command. To retrieve an olevariant from a received command,provide the RID of the command record and the property value of theolevariant.

For example,

MyOleVariant=MyESDK.GetCommandOleVariant(RID, 10005)

The property value 10005 represents the user defined olevariant. Todetermine the command value associated with the command identifier, callthe GetCommandCMD method.

Parameters

RID

A string representing the command identification value.

Prop

An integer representing the property value of the olevariant.

Return Values

If the method succeeds, the return value is the olevariant value of thespecified property.

If the method fails, the return value is NIL.

GetCommandCount

{xe “GetCommandCount”}{xe “TESDK:GetCommandCount”}

function GetCommandCount: Integer;

The GetCommandCount method returns the total number of in-memorycommands within the real-time client. The real-time client keeps trackof received and sent commands in memory. Commands are automaticallycleared from memory if CommandAutoClear is TRUE once the command isreceived and after the OnCommand event or the command is sent usingSetCommand. To manually clear in-memory command records, see theClearCommand and ClearCommandAll methods.

Return Values

If the method succeeds, the return value is an integer command count.

If the method fails, the return value is 0.

GetCommandRID

{xe “GetCommandRID”}{xe “TESDK:GetCommandRID”}

function GetCommandRID(Index: Integer) String;

The GetCommand RID method returns the RID associated with a givenin-memory command based upon the in-memory command index. To determinethe total count of commands in memory, call the GetCommandCount method.Command indexes are relative to zero in memory. To walk the entirecommand listing in memory, start at zero and go to GetCommandCount minusone.

Parameters

Index

An integer representing the in-memory command index.

Return Values

If the method succeeds, the return value is the RID string.

If the method fails, the return value is NULL.

GetCommandCMD

{xe “GetCommandCMD”}{xe “TESDK:GetCommandCMD”}

function GetCommandCMD(RID: String): Integer;

The GetCommandCMD method returns the command value associated with agiven in-memory command based upon the command identification.

Parameters

RID

A string representing the command identification value.

Return Values

If the method succeeds, the return value is the command value integer.

If the method fails, the return value is 0.

ExistCommandProp

{xe “ExistCommandProp”}{xe “TESDK:ExistCommandProp”}

function ExistCommandProp(RID: String; Prop: Integer): Boolean;

The ExistCommandProp method checks for the existence of a propertywithin an in-memory command.

Parameters

RID

A string representing the command identification value.

Prop

An integer representing the property value.

Return Values

If the method succeeds, the return value is TRUE.

If the method fails, the return value is FALSE.

ExistCommand

{xe “ExistCommand”}{xe “TESDK:ExistCommand”}

function ExistCommand(RID: String): Boolean;

The ExistCommand method checks for the existence of an in-memorycommand.

Parameters

RID

A string representing the command identification value.

Return Values

If the method succeeds, the return value is TRUE.

If the method fails, the return value is FALSE.

ClearCommand

{xe “ClearCommand”}{xe “TESDK:ClearCommand”}

procedure ClearCommand (RID: String);

The ClearCommand method clears an in-memory command.

Parameters

RID

A string representing the command identification value.

ClearCommandAll

{xe “ClearCommandAll”}{xe “TESDK:ClearCommandAll”}

procedure ClearCommandAll;

The ClearCommandAll method clears all in-memory commands.

SetStatus

{xe “SetStatus”}{xe “TESDK:SetStatus”}

function SetStatus: Boolean;

The SetStatus method announces the client's personal in-memory status tothe real-time server. All status values assigned are automatically sentto the server. To assign values to in-memory status, seeSetStatusString, SetStatusInteger, SetStatusBoolean andSetStatusDateTime.

Return Values

If the method succeeds, the return value is TRUE.

If the method fails, the return value is FALSE.

SetStatusMode

{xe “SetStatusMode”}{xe “TESDK:SetStatusMode”}

function SetStatusMode(Mode: Integer) Boolean;

The SetStatusMode changes the status operating mode of the real-timeclient. The real-time client supports two modes of operation for howstatus information is received from other users. By default thereal-time client operates in full mode (T_STATUS_FULL). In full mode,all status information for all users within the real-time communicationsnetwork is received by the real-time client through the OnStatus eventautomatically. It is not necessary to use the GetStatusRequest method.This is limited in an enterprise real-time environment through the useof profiles that are created with the server console on the real-timeserver. By implementing full status mode, an enterprise product isessentially created where the majority of user and group management willoccur on the real-time server through the real-time server's managementconsole.

The other operating mode is known as partial mode (T_STATUS_PARTIAL). Inpartial mode, only status information is received for users requestedusing the GetStatusRequest method. By implementing partial status modean enterprise product is essentially created that operates in asubscriber model like most consumer IM products.

For example,

MyESDK.SetStatusMode(1)

The status mode 1 (T_MODE_PAL) represents the partial status mode value.For a listing of all property values, see Status Constants.

Once status is requested for a given user in partial status mode, or ifusing full status mode, all subsequent status changes for that user willbe received through the OnStatus event.

Parameters

Mode

A integer representing the status operating mode.

Return Values

If the method succeeds, the return value is TRUE.

If the method fails, the return value is FALSE.

SetStatusString

{xe “SetStatusString”}{xe “TESDK:SetStatusString”}

procedure SetStatusString(Prop: Integer; Value: String);

The SetStatusString method sets a property string in personal in-memorystatus. To change in-memory status, provide the property and a newvalue. In order to have status processed by the real-time server aftermaking any changes, call the SetStatus method.

For example,

MyESDK.SetStatusString(100, “Online”)

MyESDK. SetStatus

The property value 100 (T_STATUS_MSG) represents the status presencemessage that is displayed in the directory next to the user's identity.For a listing of all property values, see Status constants. To createextensible custom status properties, see creating a custom statusproperty.

Parameters

Prop

A integer representing the property.

Value

A string representing the value assigned to the property.

SetStatusInteger

{xe “SetStatusInteger”}{xe “TESDK:SetStatusInteger”}

procedure SetStatusInteger(Prop: Integer; Value: Integer);

The SetStatusInteger method sets a property string in personal in-memorystatus. To change in-memory status, provide the property and a newvalue. In order to have status processed by the real-time server aftermaking any changes, call the SetStatus method.

For example,

MyESDK. SetStatusInteger(101, 1)

MyESDK.SetStatus

The property value 101 (T_STATUS_STI) represents the status presenceimage icon that is displayed in the directory next to the user'sidentity. The value 1 (STA_ON) tells the client to use the green, onlineuser icon. For a complete listing of all property values, see Statusconstants. To create extensible custom status properties, see creating acustom status property.

Parameters

Prop

A integer representing the property.

Value

An integer representing the value assigned to the property.

SetStatusBoolean

{xe “SetStatusBoolean”}{xe “TESDK:SetStatusBoolean”}

procedure SetStatusBoolean(Prop: Integer; Value: Boolean);

The SetStatusBoolean method sets a property boolean in personalin-memory status. To change in-memory status, provide the property and anew value. In order to have status processed by the real-time serverafter making any changes, call the SetStatus method. For a listingproperty values, see Status constants. To create extensible customstatus properties, see creating a custom status property.

Parameters

Prop

A integer representing the property.

Value

A boolean representing the value assigned to the property.

SetStatusDateTime

{xe “SetStatusDateTime”}{xe “TESDK:SetStatusDateTime”}

procedure SetStatusDateTime(Prop: Integer; Value: TDateTime);

The SetStatusDateTime method sets a property datetime in personalin-memory status. To change in-memory status, provide the property and anew value. In order to have status processed by the real-time serverafter making any changes, call the SetStatus method.

For example,

MyESDK.SetStatusDateTime(110, Now)

MyESDK.SetStatus

The property value 110 (T-STATUS_TIME) represents the status presencecurrent time that could be displayed in the directory next to the user'sidentity. For a listing property values, see status constants, below. Tocreate extensible custom status properties, see creating a custom statusproperty.

Parameters

Prop

A integer representing the property.

Value

A datetime representing the value assigned to the property.

GetStatusRequestAll

{xe “GetStatusReQuestAll”{xe “TESDK:GetStatusReQuestAll”}

function GetStatusRequestAll: Boolean;

The GetStatusRequestAll method requests all status information for allusers from the real-time server. To obtain a complete listing of thestatus of all users from the real-time server use this method. Thestatus information is received in the OnStatus event. A call toGetStatusRequestAll only provides a listing of users with their currentstatus and does not imply tracking status changes for these users. Inorder to track the status changes of users, either use full status modewith the SetStatusMode method or request status tracking by using theGetStatusRequest method. The status information returned by this methodis limited by any profile restrictions imposed through the real-timeserver.

Return Values

If the method succeeds, the return value is TRUE.

If the method fails, the return value is FALSE.

GetStatusRequestQuery

{xe “GetStatusRequestQuery”}{xe “TESDK:GetStatusRequestQuery”

function GetStatusRequestQuery(Query: String): Boolean;

The GetStatusRequestQuery method requests status information forpartially matching users from the real-time server. To obtain a listingof the status of all users who partially match the query parameter, usethis method. The status information is received in the OnStatus event. Acall to GetStatusRequestQuery only provides a listing of users withtheir current status and does not imply that the client will be trackingstatus changes for these users. In order to track the status changes ofusers, either use full status mode with the SetStatusMode method orrequest status tracking by using the GetStatusRequest method. The statusinformation returned by this method is limited by any profilerestrictions imposed through the real-time server.

Parameters

Query

A search string representing a partial identity.

Return Values

If the method succeeds, the return value is TRUE.

If the method fails, the return value is FALSE.

GetStatusRequest

{xe “GetStatusRequest”}{xe “TESDK:GetStatusRequest”}

function GetStatusRequest(UID: String): Boolean;

The GetStatusRequest method requests status information and tracking forthe specified UID from the real-time server. A call to GetStatusRequestwill immediately request the current status of the requested UID.Additionally, any status changes that happen for the given UID willautomatically be received. All of these status changes occur through theuse of the OnStatus event. It is only necessary to use this method inpartial status mode. See SetStatusMode for more details on changing thestatus operating mode.

Parameters

UID

A string representing the user identification.

Return Values

If the method succeeds, the return value is TRUE.

If the method fails, the return value is FALSE.

GetStatusCount

{xe “GetStatusCount”}{xe “TESDK:GetStatusCount”}

function GetStatusCount: Integer;

The GetStatusCount method returns the total number of in-memory statusrecords that have been received within the real-time client. Thereal-time client keeps track of the current status information for usersin memory provided that either using full status operating mode is beingused or status tracking using GetStatusRequest in partial statusoperating mode has been requested. For more information on changing thestatus operating mode see SetStatusMode. To clear all in-memory statusrecords, see the ClearStatusAll method.

Return Values

If the method succeeds, the return value is an integer status count.

If the method fails, the return value is 0.

GetStatusUID

{xe “GetStatusUID”}{xe “TESDK:GetStatusUID”}

function GetStatusUID(Index: integer): String;

The GetStatusUID method returns the UID associated with a givenin-memory status based upon the in-memory status index. To determine thetotal count of statuses in memory, call the GetStatusCount method.Status indexes are relative to zero in memory. To walk the entire statuslisting in memory, start at zero and go to GetStatusCount minus one.

Parameters

Index

An integer representing the in-memory status index.

Return Values

If the method succeeds, the return value is the UID string.

If the method fails, the return value is NULL.

GetStatusString

{xe “GetStatusString”}{xe “TESDK:GetStatusString”}

function GetStatusString(UID: String; Prop: Integer): String;

The GetStatusString method gets a property string from an in-memorystatus record. To retrieve a string from an in-memory status record,provide the UID of the status record and the property value of thestring.

For example,

Identity=MyESDK.GetStatusString(UID, 103)

The property value 103 (T_STATUS_IDENTITY) represents the identity ordisplayed name in the directory for the given UID. For a listingproperty values, see Status constants. To create extensible customstatus properties, see creating a custom status property.

Parameters

UID

A string representing the user identification value.

Prop

An integer representing the property value of the string.

Return Values

If the method succeeds, the return value is the string value of thespecified property.

If the method fails, the return value is NULL.

GetStatusInteger

{xe “GetStatusInteger”}{xe “TESDK:GetStatusIntegere”}

function GetStatusInteger (UID: String; Prop: Integer): Integer;

The GetStatusInteger method gets a property integer from an in-memorystatus record. To retrieve an integer from an in-memory status record,provide the UID of the status record and the property value of theinteger.

For example,

State=MyESDK. GetStatusInteger(UID, 101)

The property value 101 (T_STATUS_STATE) represents the state in thedirectory for the given UID. The state is the type of icon that isdisplayed next to a given name for their current status state (ex: Donot disturb). For a listing property values, see Status constants. Tocreate custom status properties, see How to Creating a Custom StatusProperty.

Parameters

UID

A string representing the user identification value.

Prop

An integer representing the property value of the string.

Return Values

If the method succeeds, the return value is the integer value of thespecified property.

If the method fails, the return value is 0.

GetStatusBoolean

{xe “GetStatusBoolean”}{xe “TESDK:GetStatusBoolean”}

function GetStatusBoolean(UID: String; Prop: Integer): Boolean;

The GetStatusBoolean method gets a property boolean from an in-memorystatus record. To retrieve a boolean from an in-memory status record,provide the UID of the status record and the property value of theboolean. For a listing property values, see Status constants, below. Tocreate extensible custom status properties, see How to Creating a CustomStatus Property.

Parameters

UID

A string representing the user identification value.

Prop

An integer representing the property value of the boolean.

Return Values

If the method succeeds, the return value is the boolean value of thespecified property.

If the method fails, the return value is FALSE.

GetStatusDateTime

{xe “GetStatusDateTime”}{xe “TESDK:GetStatusDateTime”}

function GetStatusDateTime (UID: String; Prop: Integer): TDateTime;

The GetStatusDateTime method gets a property datetime from an in-memorystatus record. To retrieve a datetime from an in-memory status record,provide the UID of the status record and the property value of thedatetime.

For example,

Time=MyESDK.GetStatusDateTime(UID, 110)

The property value 110 (T_STATUS_TIME) represents the date and time inthe directory for the given UID. For a listing property values, seeStatus constants. To create custom status properties, see creating acustom status property.

Parameters

UID

A string representing the user identification value.

Prop

An integer representing the property value of the datetime.

Return Values

If the method succeeds, the return value is the datetime value of thespecified property.

If the method fails, the return value is 0.

GetStatusGroupCount

{xe “GetStatusGroupCount”}{xe “TESDK:GetStatusGroupCount”

The GetStatusGroupCount method returns the total number of in-memorygroups associated with the specified in-memory user. To extract thegroup names associated with any particular index, see GetStatusGroup.

Parameters

UID

A string representing the user identification value.

Return Values

If the method succeeds, the return value is an integer group count forthe respective user.

If the method fails, the return value is 0.

GetStatusGroup

{xe “GetStatusGroup”}{xe “TESDK:GetStatusGroup”}

The GetStatusGroup method returns the group name associated with a givenin-memory user based upon the group index. To determine the total countof groups related to a user in memory, call the GetStatusGroupCountmethod. Indexes are relative to zero in memory. To check the entirerecipient list in memory, start at zero and go to GetStatusGroupCountminus one.

Parameters

UID

A string representing the user identification value.

Index

An integer representing the in-memory group index.

Return Values

If the method succeeds, the return value is a string representing thegroup name.

If the method fails, the return value is NULL.

ExistStatusProp

{xe “ExistStatusProp”}{xe “TESDK:ExistStatusProp”}

function ExistStatusProp(UID: String; Prop: Integer): Boolean;

The ExistStatusProp method checks for the existence of a property withinan in-memory status record. This method can be used to check for theexistence of a property in an in-memory status record. The method can beused for both common status properties and custom status properties. Fora listing property values, see Status constants. To create custom statusproperties, see creating a custom status property.

Parameters

UID

A string representing the user identification value.

Prop

An integer representing the property value.

Return Values

If the method succeeds, the return value is TRUE.

If the method fails, the return value is FALSE.

ExistStatus

{xe “ExistStatus”}{xe “TESDK:ExistStatus”}

function ExistStatus(UID: String): Boolean;

The ExistStatus method checks for the existence of a given in-memoryuser status record.

Parameters

UID

A string representing the user identification value.

Return Values

If the method succeeds, the return value is TRUE

If the method fails, the return value is FALSE.

ClearStatusAll

{xe “ClearStatusAll”}{xe “TESDK:ClearStatusAll”}

procedure ClearStatusAll;

The ClearStatusAll method clears all in-memory status records. Thestatus records are only removed from the local in-memory and can berefreshed at anytime by calling GetStatusRequestAll,GetStatusRequestQuery or GetStatusRequest.

ClearStatusGroups

{xe “ClearStatusGroups”}{xe “TESDK:ClearStatusGroups”}

procedure ClearStatusGroups;

The ClearStatusGroups method clears all groups from personal in-memorystatus.

ClearStatusProperties

{xe “ClearStatusProperties”}{xe “TESDK:ClearStatusProperties”

procedure ClearStatusProperties;

The ClearStatusProperties method clears all custom properties frompersonal in-memory status.

CreateMessage

{xe “CreateMessage”}{xe “TESDK:CreateMessage”}

function CreateMessage: String;

The CreateMessage method creates a new in-memory message record. UseCreateMessage to create a custom in-memory message for sending messagesto the real-time server. When constructing a message to be sent, startby creating a message in-memory. The CreateMessage method returns astring which represents the MID of the created message.

For example,

MID=MyESDK.CreateMessage

For more information on sending messages, see How to Send a message.

Return Values

If the method succeeds, the return value is the MID string.

If the method fails, the return value is NULL.

SetMessage

{xe “SetMessage”}{“TESDK:SetMessage”}

function SetMessage(MID: String): Boolean;

The SetMessage sends an in-memory message to the real-time server. If amessage has been fully constructed and is ready to be sent to thereal-time server, call this method. For more information on sendingmessages, see How to Send a Message.

Parameters

MID

A string representing the message identification value.

Return Values

If the method succeeds, the return value is TRUE.

If the method fails, the return value is FALSE.

SetMessageString

{xe “SetMessageString”}{xe “TESDK:SetMessageString”}

procedure SetMessageString(MID: String; Prop: Integer; Value: String);

The SetMessageString method sets an in-memory property string. To changean in-memory message, provide the property and a new value. Constructinga message involves adding various details to a created message. For moreinformation on sending messages, see How To Send a Message. In order tohave the message sent to the real-time server, call the SetMessagemethod.

For example,

MyESDK.SetMessageString(MID, 105, “My Subject”)

The MID represents the message identifier that was obtained by callingthe method CreateMessage. The property value 105 (T_MESSAGE_SUBJECT)represents the subject of the message. For a listing property values,see Message constants. To create extensible custom message properties,see How to Create a Custom Message Property.

Parameters

MID

The message identifier of the message.

Prop

A integer representing the property.

Value

A string representing the value assigned to the property.

SetMessageInteger

{xe “SetMessageInteger”}{xe “TESDK:SetMessageInteger”}

procedure SetMessageInteger(MID: String; Prop: Integer; Value: Integer);

The SetMessageInteger method sets an in-memory property integer. Tochange an in-memory message, provide the property and a new value.Constructing a message involves adding various details to a createdmessage. For more information on sending messages, see How To Send aMessage. In order to have the message sent to the real-time server, callthe SetMessage method. For a listing property values, see Messageconstants. To create extensible custom message properties, see How toCreate a Custom Message Property.

Parameters

MID

The message identifier of the message.

Prop

A integer representing the property.

Value

An integer representing the value assigned to the property.

SetMessageBoolean

{xe “SetMessageBoolean”}{xe “TESDK:SetMessageBoolean”}

procedure SetMessageBoolean(MID: String; Prop: Integer; Value: Boolean);

The SetMessageBoolean sets an in-memory property boolean. To change anin-memory message, provide the property and a new value. Constructing amessage involves adding various details to a created message. For moreinformation on sending messages, see How to Send a Message. In order tohave the message sent to the real-time server, call the SetMessagemethod. For a listing property values, see Message constants. To createextensible custom message properties, see How to Create a Custom MessageProperty.

Parameters

MID

The message identifier of the message.

Prop

A integer representing the property.

Value

A boolean representing the value assigned to the property.

SetMessageDateTime

{xe “SetMessageDateTime”}{xe “TESDK:SetMessageDateTime”}

procedure SetMessageDateTime(MID: String; Prop: Integer; Value:TDateTime);

The SetMessageDateTime method sets an in-memory property datetime. Tochange an in-memory message, provide the property and a new value.Constructing a message involves adding various details to a createdmessage. For more information on sending messages, see How To Send aMessage. In order to have the message sent to the real-time server, callthe SetMessage method.

For example,

MyESDK.SetMessageDateTime(MID,1 06,Now)

The MID represents the message identifier that was obtained by callingthe method CreateMessage. The property value 106 (T_MESSAGE_SENT)represents the date and time the message was sent. For a listingproperty values, see Message constants. To create extensible custommessage properties, see How to Create a Custom Message Property.

Parameters

MID

The message identifier of the message.

Prop

A integer representing the property.

Value

A datetime representing the value assigned to the property.

SetMessageStream

{xe “SetMessageStream”}{xe “TESDK:SetMessageStream”}

procedure SetMessageStream(MID: String; Prop: Integer; Value:TMemoryStream);

The SetMessageStream method sets an in-memory property stream. To changean in-memory message, provide the property and a new value. Constructinga message involves adding various details to a created message. For moreinformation on sending messages, see How to Send a Message. In order tohave the message sent to the real-time server, call the SetMessagemethod. Streams are designed for compatibility with Borland developmentenvironments. For Microsoft development environments,SetMessageOleVariant may be needed instead. For a listing propertyvalues, see Message constants. To create extensible custom messageproperties, see How to Create a Custom Message Property.

Parameters

MID

The message identifier of the message.

Prop

A integer representing the property.

Value

A stream representing the value assigned to the property.

SetMessageOleVariant

{xe “SetMessageOleVariant”}{xe “TESDK:SetMessageOleVariant”}

procedure SetMessageOleVariant(MID: String; Prop: Integer; Value:OleVariant);

The SetMessageOleVariant method sets an in-memory property olevariant.To change an in-memory message, provide the property and a new value.Constructing a message involves adding various details to a createdmessage. For more information on sending messages, see How to Send aMessage. In order to have the message sent to the real-time server, callthe SetMessage method. OleVariants are designed for compatibility withMicrosoft development environments. For Borland developmentenvironments, choose to use SetMessageStream instead. For a listingproperty values, see Message constants. To create extensible custommessage properties, see How to Create a Custom Message Property.

Parameters

MID

The message identifier of the message.

Prop

A integer representing the property.

Value

An olevariant representing the value assigned to the property.

SetMessageBodyAsRTF

{xe “SetMessageBodyAsRTF”}{xe “TESDK:SetMessageBodyAsRTF”}

procedure SetMessageBodyAsRTF(MID: String; Value: String);

The SetMessageBodyAsRTF method assigns rich text formatted content to amessage body. This method takes rich text with fonts, colors andgraphics, embedded images and objects and applies the content as thebody of the message. To use this method, simply transfer the content ofa RichEdit control or component to a string. The string can then bedirectly assigned to the SetMessageBodyAsRTF method.

Constructing a message involves adding various details to a createdmessage. For more information on sending messages, see How To Send aMessage. In order to have message sent to the real-time server, call theSetMessage method.

Parameters

MID

The message identifier of the message.

Value

A string comprised of rich text formatted content.

SetMessageBodyAsText

{xe “SetMessageBodyAsText”}{xe “TESDK:SetMessageBodyAsText

procedure SetMessageBodyAsText (MID: String; Value: String);

The SetMessageBodyAsText method assigns plain text content to a messagebody. This method takes plain text, converts it to simple rich text andapplies the content as the body of the message. To apply carriagereturns in the body of the text, include the characters LF (10) and CR(13) together within the string.

Constructing a message involves adding various details to a createdmessage. For more information on sending messages, see How to Send aMessage. In order to have the message sent to the real-time server, callthe SetMessage method.

Parameters

MID

The message identifier of the message.

Value

A string comprised of rich text formatted content.

SetMessageRecipient

{xe “SetMessageRecipient”}{xe “TESDK:SetMessageRecipient”}

procedure SetMessageRecipient (MID: String; Value: String; UID: String);

The SetMessageRecipient method adds a recipient to a message. Thismethod is used to add a recipient to the recipients list for a message.In order to add a recipient, supply a descriptive name and UID.

For example,

MyESDK.SetMessageRecipient(Ml D, Smith”, UID)

Subsequent calls to SetMessageRecipient will add more users to therecipient list. A typical recipient uses the Identity as the descriptivename associated with a single UID. However, the SetMessageRecipientmethod supports the ability to associate multiple different UIDs with asingle common descriptive name. This would be used when creating a groupthat contains more than a single UID as a recipient for a message. Toclear all the recipients from a message, call the ClearMessageRecipientsmethod.

Parameters

MID

A string representing the message identifier of the message.

Value

A string representing the descriptive name for the recipient.

UID

A string representing the UID of the recipient.

SetMessageAttachmentAsFile

{xe “SetMessageAttachmentAsFile”}{xe

“TESDK:SetMessageAttachmentAsFile”}

function SetMessageAttachmentAsFile (MID: String; Name: String):Boolean;

The SetMessageAttachmentAsFile attaches a file to a message from a givenpath. This method will attach and compress a file to a message basedupon the given path.

For example,

MyESDK.SetMessageAttachmentAsFile(MID,“C: .BAT”)

Attachments are automatically compressed as they are included with themessage. To attach a message from data that is already in memory seeSetMessageAttachmentAsStream or SetMessageAttachmentAsOleVariant. Toextract a message, upon receipt, use the GetMessageAttachmentAsFilemethod. To clear all the attachments from a message, call theClearMessageAttachments method.

Parameters

MID

A string representing the message identifier of the message.

Name

A string representing the path and filename of the attachment.

Return Values

If the method succeeds, the return value is TRUE.

If the method fails, the return value is FALSE.

SetMessageAttachmentAsStream

(xe “SetMessageAttachmentAsStream”}

{xe “TESDK:SetMessageAttachmentAsStream”}

procedure SetMessageAttachmentAsStream(MID: String; Name: String; Value:TMemoryStream);

The SetMessageAttachmentAsStream attaches a file to a message from astream. This method will attach and compress a file to a message basedupon a stream.

For example,

MyESDK. SetMessageAttachmentAsStream(MID, “AUTOEXEC.BAT”,MyStream)Attachments are automatically compressed as they are included with themessage. To attach a message from a file instead of memory, seeSetMessageAttachmentAsFile. To extract a message upon receipt, use theGetMessageAttachmentAsFile method. Streams are designed primarily forBorland development environments. For Microsoft and other developmentenvironments see SetMessageAttachmentAsOleVariant instead. To clear allthe attachments from a message, call the ClearMessageAttachments method.

Parameters

MID

A string representing the message identifier of the message.

Name

A string representing the path and filename of the attachment.

Value

A stream representing the attachment.

SetMessageAttachmentAsOleVariant

{xe “SetMessageAttachmentAsOleVariant”}

{xe “TESDK:SetMessageAttachmentAsOleVariant”}

procedure SetMessageAttachmentAsOleVariant (MID: String; Name: String;Value: OleVariant);

The SetMessageAttachmentAsOleVariant attaches a file to a message froman olevariant. This method will attach and compress a file to a messagebased upon an olevariant.

For example,

MyESDK.SetMessageAttachmentAsOleVariant(MID,“AUTOEXEC.BAT”,MyOleVariant)

Attachments are automatically compressed as they are included with themessage. To attach a message from a file instead of memory, seeSetMessageAttachmentAsFile. To extract a message upon receipt, use theGetMessageAttachmentAsFile method. OleVariants are designed primarilyfor Microsoft development environments. For Borland developmentenvironments see SetMessageAttachmentAsStream instead. To clear all theattachments from a message, call the ClearMessageAttachments method.

Parameters

MID

A string representing the message identifier of the message.

Name

A string representing the path and filename of the attachment.

Value

An olevariant representing the attachment.

GetMessageString

{xe “GetMessageString”}{xe “TESDK:GetMessageString”}

function GetMessageString(MID: String; Prop: Integer): String;

The GetMessageString method gets a property string from an in-memorymessage record. To retrieve a string from an in-memory message record,provide the MID of the message record and the property value of thestring.

For example,

Identity=MyESDK. GetMessageString(MID, 103)

The property value 103 (T_MESSAGE_FROM) represents the sender'sidentity. For a complete listing of property values, see Messageconstants. To create extensible custom message properties, see How toCreate a Custom Message Property.

Parameters

MID

A string representing the message identification value.

Prop

An integer representing the property value of the string.

Return Values

If the method succeeds, the return value is the string value of thespecified property.

If the method fails, the return value is NULL.

GetMessageInteger

{xe “GetMessageInteger”}{xe “TESDK:GetMessageInteger”}

function GetMessageInteger(MID: String; Prop: Integer): Integer;

The GetMessageInteger method gets a property integer from an in-memorymessage record. To retrieve an integer from an in-memory message record,provide the MID of the message record and the property value of theinteger. For a listing property values, see Message constants. To createextensible custom message properties, see How to Create a Custom MessageProperty.

Parameters

MID

A string representing the message identification value.

Prop

An integer representing the property value of the integer.

Return Values

If the method succeeds, the return value is the integer value of thespecified property.

If the method fails, the return value is 0.

GetMessageBoolean

{xe “GetMessageBoolean”}{xe “TESDK:GetMessageBoolean”}

function GetMessageBoolean(MID: String; Prop: Integer): Boolean;

The GetMessageBoolean method gets a property boolean from an in-memorymessage record. To retrieve a boolean from an in-memory message record,provide the MID of the message record and the property value of theboolean. For a listing property values, see Message constants. To createextensible custom message properties, see How to Create a Custom MessageProperty.

Parameters

MID

A string representing the message identification value.

Prop

An integer representing the property value of the boolean.

Return Values

If the method succeeds, the return value is the boolean value of thespecified property.

If the method fails, the return value is FALSE.

GetMessageDateTime

{xe “GetMessageDateTime”}{xe “TESDK:GetMessageDateTime”}

function GetMessageDateTime(MID: String; Prop: Integer): TDateTime;

The GetMessageDateTime method gets a property datetime from an in-memorymessage record. To retrieve a datetime from an in-memory message record,provide the MID of the message record and the property value of thedatetime. For a listing property values, see Message constants. Tocreate extensible custom message properties, see How to Create a CustomMessage Property.

Parameters

MID

A string representing the message identification value.

Prop

An integer representing the property value of the datetime.

Return Values

If the method succeeds, the return value is the datetime value of thespecified property.

If the method fails, the return value is 0.

GetMessageStream

{xe “GetMessageStream”}{xe “TESDK:GetMessageStream}

function GetMessageStream(MID: String; Prop: Integer): TMemoryStream;

The GetMessageStream method gets a property stream from an in-memorymessage record. To retrieve a stream from an in-memory message record,provide the MID of the message record and the property value of thestream. For a listing property values, see Message constants. To createextensible custom message properties, see How to Create a Custom MessageProperty.

Parameters

MID

A string representing the message identification value.

Prop

An integer representing the property value of the stream.

Return Values

If the method succeeds, the return value is the stream value of thespecified property.

If the method fails, the return value is NIL.

GetMessageOleVariant

{xe “GetMessageOleVariant”}{xe “TESDK:GetMessageOleVariant”}

function GetMessageOleVariant(MID: String; Prop: Integer): OleVariant;

The GetMessageOleVariant method gets a property olevariant from anin-memory message record. To retrieve an olevariant from an in-memorymessage record, provide the MID of the message record and the propertyvalue of the olevariant. For a listing property values, see Messageconstants. To create extensible custom message properties, see How toCreate a Custom Message Property.

Parameters

MID

A string representing the message identification value.

Prop

An integer representing the property value of the olevariant.

Return Values

If the method succeeds, the return value is the olevariant value of thespecified property.

If the method fails, the return value is NIL.

GetMessageAttachmentName

{xe “GetMessageAttachmentName”}

{xe “TESDK:GetMessageAttachmentName”}

function GetMessageAttachmentName(MID: String; Index: Integer): String;

The GetMessageAttachmentName method returns the name associated with agiven in-memory message attachment based upon the message attachmentindex. To determine the total count of attachments related to a messagein memory, call the GetMessageAttachmentCount method. Indexes arerelative to zero in memory. To walk the entire attachment list inmemory, start at zero and go to GetMessageAttachmentCount minus one.

Parameters

MID

A string representing the message identification value.

Index

An integer representing the in-memory message index.

Return Values

If the method succeeds, the return value is a string representing thename of the attachment.

If the method fails, the return value is NULL.

GetMessageAttachmentCount

{xe “GetMessageAttachmentCount”}

{xe “TESDK:GetMessageAttachmentCount”}

function GetMessageAttachmentCount(MID: String): Integer

The GetMessageAttachmentCount method returns the total number ofin-memory message attachments associated with the specified in-memorymessage. To extract the message attachment names associated with anyparticular index, see GetMessageAttachmentName.

Parameters

MID

A string representing the message identification value.

Return Values

If the method succeeds, the return value is an integer messageattachment count.

If the method fails, the return value is 0.

GetMessageAttachmentAsFile

{xe “GetMessageAttachmentAsFile”}

{xe “TESDK:GetMessageAttachmentAsFile”}

function GetMessageAttachmentAsFile(MID: String; Index: Integer; Name:String) Boolean;

The GetMessageAttachmentAsFile method saves an in-memory messageattachment to a file. To determine the total count of attachments inmemory, call the GetMessageAttachmentCount method. Message attachmentindexes are relative to zero in memory. To walk the entire messageattachment listing in memory, start at zero and go toGetMessageAttachmentCount minus one.

Parameters

MID

A string representing the message identification value.

Index

An integer representing the in-memory message index.

Name

A string representing the path and filename of the saved attachment.

Return Values

If the method succeeds, the return value is TRUE.

If the method fails, the return value is FALSE.

GetMessageAttachmentAsStream

{xe “GetMessageAttachmentAsStream”}

{xe “TESDK:GetMessageAttachmentAsStream”}

function GetMessageAttachmentAsStream(MID: String; Index: Integer):TMemoryStream;

The GetMessageAttachmentAsStream method gets a stream from an in-memorymessage attachment. To determine the total count of attachments inmemory, call the GetMessageAttachmentCount method. Message attachmentindexes are relative to zero in memory. To walk the entire messageattachment listing in memory, must start at zero and go toGetMessageAttachmentCount minus one.

Parameters

MID

A string representing the message identification value.

Index

An integer representing the in-memory message index.

Return Values

If the method succeeds, the return value is a stream.

If the method fails, the return value is NIL.

GetMessageAttachmentAsOleVariant

{xe “GetMessageAttachmentAsOleVariant”}

{xe “TESDK:GetMessageAttachmentAsOleVariant”}

function GetMessageAttachmentAsOleVariant(MID: String; Index: Integer):OleVariant;

The GetMessageAttachmentAsOleVariant method gets an olevariant from anin-memory message attachment. To determine the total count ofattachments in memory, call the GetMessageAttachmentCount method.Message attachment indexes are relative to zero in memory. To walk theentire message attachment listing in memory, start at zero and go toGetMessageAttachmentCount minus one.

Parameters

MID

A string representing the message identification value.

Index

An integer representing the in-memory message index.

Return Values

If the method succeeds, the return value is an olevariant.

If the method fails, the return value is NIL.

GetMessageBodyAsText

{xe “GetMessageBodyAsText”}{xe “TESDK:GetMessageBodyAsText”}

function GetMessageBodyAsText(MID: String): String;

The GetMessageBodyAsText method gets the body of a message from anin-memory message record. The body is converted from an RTF format toplain text as it is extracted into a string.

For example,

Text=MyESDK.GetMessageBodyAsText(MID)

To extract the body of a message in Rich Text Format, seeGetMessageBodyAsRTF instead.

Parameters

MID

A string representing the message identification value.

Return Values

If the method succeeds, the return value is a string representing thebody of a message.

If the method fails, the return value is NULL.

GetMessageBodyAsRTF

{xe “GetMessageBodyAsRTF”}{xe “TESDK:GetMessageBodyAsRTF”}

function GetMessageBodyAsRTF(MID: String): String;

The GetMessageBodyAsRTF method gets the body of a message from anin-memory message record. The body is formatted in Rich Text Format asit is extracted into a string.

For example,

RTF=MyESDK.GetMessageBodyAsRTF(MID)

To extract the body of a message in plain text, see GetMessageBodyAsTextinstead.

Parameters

MID

A string representing the message identification value.

Return Values

If the method succeeds, the return value is a string representing thebody of a message.

If the method fails, the return value is NULL.

GetMessageRecipientCount

{xe “GetMessageRecipientCount”}{“TESDK:GetMessageRecipientCount”}

function GetMessageRecipientCount(MID: String): Integer;

The GetMessageRecipientCount method returns the total number ofin-memory recipients associated with the specified in-memory message. Toextract the message recipient names associated with any particularindex, see GetMessageRecipientName.

Parameters

MID

A string representing the message identification value.

Return Values

If the method succeeds, the return value is an integer message recipientcount.

If the method fails, the return value is 0.

GetMessageRecipientName {xe “GetMessageRecipientName”}{xe“TESDK:GetMessageRecipientName”}

function GetMessageRecipientName(MID: String; Index: Integer): String;

The GetMessageRecipientName method returns the name associated with agiven in-memory message recipient based upon the message recipientindex. To determine the total count of recipients related to a messagein memory, call the GetMessageRecipientCount method. Indexes arerelative to zero in memory. To walk the entire recipient list in memory,start at zero and go to GetMessageRecipientCount minus one.

Parameters

MID

A string representing the message identification value.

Index

An integer representing the in-memory recipient index.

Return Values

If the method succeeds, the return value is a string representing thename of the recipient.

If the method fails, the return value is NULL.

GetMessageRecipientUserCount

{xe “GetMessageRecipientUserCount”}

{xe “TESDK:GetMessageRecipientUserCount”}

function GetMessageRecipientUserCount(MID: String; Index: Integer):Integer;

The GetMessageRecipientUserCount method returns the total number ofin-memory user identifications associated with the specified in-memorymessage recipient. To extract the message recipient user identificationassociated with any particular index, see GetMessageRecipientUser.

Parameters

MID

A string representing the message identification value.

Index

An integer representing the in-memory recipient user identificationindex.

Return Values

If the method succeeds, the return value is an integer message recipientuser identification count.

If the method fails, the return value is 0.

GetMessageRecipientUser

{xe “GetMessageRecipientUser”}{xe “TESDK:GetMessageRicipientUser”}

function GetMessageRecipientUser(MID: String; Index, IndexU; Integer)String;

The GetMessageRecipientUser method returns the user identificationassociated with a given in-memory message recipient based upon themessage recipient user identification index. To determine the totalcount of recipient user identifications related to a message recipientin memory, call the GetMessageRecipientUserCount method. Indexes arerelative to zero in memory. To walk the entire recipient list in memory,start at zero and go to GetMessageRecipientUserCount minus one.

Parameters

MID

A string representing the message identification value.

Index

An integer representing the in-memory recipient index.

IndexU

An integer representing the in-memory recipient user identificationindex.

Return Values

If the method succeeds, the return value is a string representing theuser identification.

If the method fails, the return value is NULL.

GetMessageCount

{xe “GetMessageCount”}{xe “TESDK:GetMessageCount”}

function GetMessageCount: Integer;

The GetMessageCount method returns the total number of in-memorymessages that have been received within the real-time client. Thereal-time client keeps track of messages in memory. Messages areautomatically cleared from memory if MessageAutoClear is TRUE once themessage is received and after the OnMessage event or the message is sentusing SetMessage. To manually clear in-memory message records, see theClearMessage and ClearMessageAll methods.

Return Values

If the method succeeds, the return value is an integer message count.

If the method fails, the return value is 0.

GetMessageMID

{xe “GetMessageMID”}{xe “TESDK:GetMessageMID”}

function GetMessageMID(Index: Integer): String;

The GetMessageMID method returns the MID associated with a givenin-memory message based upon the in-memory message index. To determinethe total count of messages in memory, call the GetMessageCount method.Message indexes are relative to zero in memory. To walk the entirestatus listing in memory, at zero and go to GetMessageCount minus one.

Parameters

Index

An integer representing the in-memory message index.

Return Values

If the method succeeds, the return value is the MID string.

If the method fails, the return value is NULL.

GetMessageRequestAll

{xe “GetMessageRequestAll”}{xe “TESDK:GetMessageRequestAll”}

function GetMessageRequestAll: Boolean;

The GetMessageRequestAll method requests all pending messages for theuser from the real-time server. To obtain any offline or pendingmessages for the user from the real-time server use this method. Themessage is received in the OnMessage event.

Return Values

If the method succeeds, the return value is TRUE.

If the method fails, the return value is FALSE.

ExistMessageProp

{xe “ExistMessageProp”}{xe “TESDK:ExistMessageProp”}

function ExistMessageProp(MID: String; Prop: Integer): Boolean;

The ExistMessageProp method checks for the existence of a propertywithin an in-memory message record. This method can be used to check forthe existence of a property in an in-memory message record. The methodcan be used for both common message properties and custom messageproperties. For a listing property values, see Message constants. Tocreate extensible custom message properties, see How to Create a CustomMessage Property.

Parameters

MID

A string representing the message identification value.

Prop

An integer representing the property value.

Return Values

If the method succeeds, the return value is TRUE.

If the method fails, the return value is FALSE.

ExistMessage

{xe “ExistMessaGe”}{xe “TESDK:ExistMessage”}

function ExistMessage(MID: String): Boolean;

The ExistMessage method checks for the existence of a given in-memorymessage record.

Parameters

MID

A string representing the message identification value.

Return Values

If the method succeeds, the return value is TRUE.

If the method fails, the return value is FALSE.

ClearMessage

{xe “ClearMessape”}{xe “TESDK:ClearMessage”}

procedure ClearMessage(ID: String);

The ClearMessage method clears an in-memory message.

Parameters

MID

A string representing the message identification value.

ClearMessageAll

{xe “ClearMessageAll”}{xe “TESDK:ClearMessageAll”}

procedure ClearMessageAll;

The ClearMessageAll method clears all in-memory messages.

ClearMessageRecipients

{xe “ClearMessageRecipients”}{xe “TESDK:ClearMessageRecipients”}

procedure ClearMessageRecipients(MID: String);

The ClearMessageRecipients method clears the recipients from anin-memory message. This method can be used to clear the recipients fromany in-memory message.

Parameters

MID

A string representing the message identification value.

ClearMessageAttachment

{xe “ClearMessageAttachments”}{xe “TESDK:ClearMessageAttachments”}

procedure ClearMessageAttachments(MID: String);

The ClearMessageRecipients method clears the attachments from anin-memory message. This method can be used to clear the attachments andfree the associated memory from any in-memory message.

Parameters

MID

A string representing the message identification value.

Connect

{xe “Connect”}{xe “TESDK:Connect”}

function Connect:Boolean;

The Connect method attempts to connect to a real-time server. In orderto connect to a real-time server, first provide the IP address and Portinformation of the real-time server along with the client's Identity andpersonal user identification UID. The Connect method returns TRUE if asocket connection was established. The Connect method returning TRUEdoes not constitute that the connection is approved by the real-timeserver. The connection is not approved until an OnClientConnected eventis received.

For example,

MyESDK.IP=“127.0.0.1”

MyESDK. Port=35000

MyESDK.Identity=“John Smith”

MyESDK.UID MyESDKCreateID

MyESDK.Connect

For more details on connecting to a real-time server, see How To Connectto a Server.

Return Values

If the method succeeds, the return value is TRUE.

If the method fails, the return value is FALSE.

Disconnect

{xe “Disconnect”}{xe “TESDK:Disconnect”}

procedure Disconnect;

The Disconnect method attempts to disconnect from a real-time server.The Disconnect method issues a graceful disconnection from a real-timeserver. The Disconnect method automatically sets the user status tooffline before the user is disconnected.

For example,

MyESDK.Disconnect

Events

OnClientError

{xe “OnClientError”}{xe “TESDK:OnClientError”}

property OnClientError: TOnClientError;

The OnClientError event is fired if the real-time client experiences anerror in connection or communications. Typically this event is fired inthe event of a socket communications problem. This event is optional.

Parameters

Error

A string representing the client error message.

OnClientConnectProgress

{xe “OnClientConnectProgress” “TESDK:OnClientConnectProgress”}

property OnClientConnectProgress: TOnClientConnectProgress;

The OnClientConnectProgress event provides information concerning theconnection progress. This event is optional and can be used to informusers of the status of the connection progress.

Parameters

Msg

A string representing the client connection progress message.

OnClientConnected

{xe “OnClientConnected”}{Xe “TESDK:OnClientConnected”}

property OnClientConnected: TOnClientConnected;

The OnClientConnected event is fired when the connection is fullyestablished and communication can proceed. This event should be handledby the real-time client application and all initial status and initialmessage delivery communications should happen in this event. During thisevent it is typical to set personal status, make requests for otheruser's status and request any messages that are offline or pending. Thefollowing examples demonstrate the appropriate methods.

For example,

MyESDK.SetStatusInteger(1 01,1)

MyESDK.SetStatusString(1 00,“Online

MyESDK.SetStatus

The above example sets the status message and icon to online. SeeSetStatus for more information.

For example,

MyESDK.GetStatusRequestAll

The above example requests an entire listing of users from the real-timeserver. See GetStatusRequestAll for more information.

For example,

MyESDK. GetMessageRequestAll

The above example requests all offline and stored messages from thereal-time server. See GetMessageRequestAll for more information.

OnClientDisconnected

{xe “OnClientDisconnected”}{xe “TESDK:OnClientDisconnected”

property OnClientDisconnected: TOnClientDisconnected;

The OnClientDisconnected event is fired when the client disconnects fromthe real-time server. This event is optional and can be used to beinformed of a disconnection.

OnClientCertificateKeys

{xe “OnClientCertificateKeys”}{xe “TESDK:OnClientCertificateKeys”}

property OnClientCertificateKeys: TOnClientCertificateKeys;

The OnClientCertificateKeys event is fired when the real-time server isusing a security policy that requires public key encryption keys inorder to communicate with the real-time server. This event is optionaland can be handled by the real-time client application if the clientmaintains the public and private keys. The CreateKeys parameter shouldbe set to TRUE if the keys will be created automatically and FALSE ifthe keys will be provided manually. Because keys can take some time tobe generated, it is beneficial to retain the keys in the clientapplication and pass them back through the use of this event. For moredetails on this topic see the GetSecurity and GetCertificateKeysmethods.

Parameters

CreateKeys

A boolean indicating whether the certificate keys should be createdautomatically or manually.

PublicKey

A string representing the public key of an encryption key pair.

PrivateKey

A string representing the private key of an encryption key pair.

OnClientUID

{xe “OnClientUID”}{xe “TESDK:OnClientUID”}

property OnClientUID: TOnClientUID;

The OnClientUID event is fired when the real-time server is providingthe correct user identification based upon the Account and Passwordprovided during the connection sequence. This event should be handled bythe real-time client application in the case of password authentication.

Parameters

UID

A string representing the user identification of an authenticated user.

OnClientLogon

{xe “OnClientLogon”}{“TESDK:OnClientLogon”}

property OnClientLogon: TOnClientLogon;

The OnClientLogon event is fired in the event the real-time server needsan Account and Password to proceed with the connection. This eventshould be handled by the real-time client application if using passwordauthentication.

Parameters

Account

A string representing the account name for logon.

Password

A string representing the password for logon.

OnServerMessage

{xe “OnServerMessage”}{xe “TESDK:OnServerMessage”}

property OnServerMessage: TOnServerMessage;

The OnServerMessage event is fired when the real-time server needs toreport a condition, message or error the real-time client. This eventshould be handled by the real-time client application and the messageshould be displayed to the real-time client user.

Parameters

Msg

A string representing the server message.

OnStatus

{xe “OnStatus”}{xe “TESDK:OnStatus”}

property OnStatus: TOnStatus;

The OnStatus event is fired when an incoming status is received. Statusevents can be caused by both manual requests, and automatic statusrequests. GetStatusRequestAll and GetStatusRequestQuery will causemanually status events based upon the requested status information. Onestatus event is generated for each user that matches the requestedquery. The client will be automatically notified with an OnStatus eventas a user's status changes provided, either use fall status mode or byindividually requesting status tracking for specific UIDs by calling theGetStatusRequest method. To change from full state mode to partialstatus mode, see the SetStatusMode method.

Parameters

UID

A string representing the user identification value.

OnMessage

{xe “OnMessage”}{xe “TESDK:OnMessage”}

property OnMessage: TOnMessage;

The OnMessage event is fired when an incoming message is received.Message events can occur automatically while the client is connected toa real-time server. A message event can also occur manually through theuse of the GetMessageRequestAll event. The optional delivered parameterallows the client to control the state of the delivery of the message.This information is logged by the Audit and Reporting add-ons fortracking purposes and can be used for a variety of purposes related tomessage delivery confirmation. The default value of 2 (T_DELIVERED)instructs the real-time server than the message was delivered. For moreinformation on this subject, see How To: Receive a message.

Parameters

MID

A string representing the message identification value.

Delivered

A string representing the delivery value.

OnCommand

{xe “OnCommand”}{xe “TESDK:OnCommand”}

property OnCommand: TOnCommand;

The OnCommand event is fired when an incoming real-time command isreceived.

Parameters

RID

A string representing the command identification value.

How to Connect to a Server

The following describes the basics of connecting to a real-time server.The client must supply the IP address and Port information of thereal-time server along with the client's Identity and personal useridentification (UID) and then call the Connect method.

For example,

MyESDK.IP=“127.0.0.1”

MyESDK. Port=35000

MyESDK.Identity=“John Smith”

MyESDK.UID MyESDK.CreateID

MyESDK.Connect

UID

A UID uniquely identifies the user to the real-time server. The user caneither maintain the UID information in the client application or the canenable authentication on the real-time server and have the real-timeserver maintain the UID information. If the user maintains the UIDwithin the application, the client needs to call CreateID at least onceto generate a UID value and then retain that value in the clientapplication. If the real-time server is maintaining the UID, the clientmust enable user authentication in the real-time server console andprovide an Account and Password when the client connects. Once theaccount and password are verified by the real-time server, the clientwill be provided the user's UID through the OnClientUID event.

Connection Related Events

OnClieintConnectProgress

The OnClientConnectProgress event provides information concerning theconnection progress. This event is optional and can be used to informusers of the status of the connection progress.

OnClientConnected

The OnClientConnected event is fired when the connection is fullyestablished and communication can proceed. This event should be handledby the real-time client application and all initial status and initialmessage delivery communications should happen in this event.

OnClientDisconnected

The OnClientDisconnected event is fired when the client disconnects fromthe real-time server. This event is optional and can be used to informusers of a disconnection.

OnClientLogon

The OnClientLogon event is fired in the event the real-time server needsan Account and Password to proceed with the connection. This eventshould be handled by the real-time client application if the userintends to use password authentication.

OnClientUID

The OnClientUID event is fired when the real-time server is providingthe correct user identification based upon the Account and Passwordprovided during the connection sequence. This event should be handled bythe real-time client application if the user intends to use passwordauthentication.

OnClientError

The OnClientError event is fired if the real-time client experiences anerror in connection or communications. Typically this event is fired inthe event of a socket communications problem. This event is optional.

OnServerMessage

The OnServerMessage event is fired when the real-time server needs toreport a condition, message or error the real-time client. This eventshould be handled by the real-time client application and the messageshould be displayed to the real-time client user.

OnClientCertificateKeys

The OnClientCertificateKeys event is fired when the real-time server isusing a security policy that requires public key encryption keys inorder to communicate with the real-time server. This event is optionaland can be handled by the real-time client application if the clientmaintains the public and private keys.

How to Send Status

The following describes the basics of sending personal status to thereal-time server.

For example.

MyESDK.SetStatusInteger(101.1)

MyESDK.SetStatusString(100,“Online”)

MyESDK.SetStatus

In the above example the SetStatusInteger method sets the property 101(T_STATUS_STI) to the value 1 (STA_ON). This sets the status icon toonline. The SetStatusString method sets the property 100 (T_STATUS_MSG)to the value “Online”. This sets the message that is displayed forstatus.

The SetStatus method can be called at any time the client needs toupdate or change its personal status with the real-time server. After aninitial connection is established it is normal to announce personalstatus to the real-time server during the OnClientConnected event. For alisting property values, see Status constants.

How to Send a Message

To send a message within the real-time client, construct a completemessage with various details. Those details include setting therecipients, the sender, the subject and the body of a message and thencalling SetMessage to send the message. For a listing property values,see Message constants.

For example,

MyESDK.SetMessageRecipient(MID,“John Smith”, UID)

MyESDK.SetMessageString(MID,103,“Myself”)

MyESDK.SetMessageString(MID,109,UID);

MyESDK.SetMessageDateTime(MID, 106, Now)

MyESDK.SetMessageString(MID, 105,“My Subject”)

MyESDK.SetMessageBodyAsRTF(MID, RTF)

MyESDK.SetMessage(MID)

Recipients

To add recipients to the message, see the SetMessageRecipient method,above. As many recipients as desired for a message may be designated bycalling once for each given recipient.

For example,

MyESDK. SetMessageRecipient(MID,“John Smith”, UID)

In the above example, the UID represents the recipient John Smith's UIDvalue. By calling SetMessageRecipient with the same name and differentUIDs the client will create a single visible object within the recipientlist that is sent to multiple UIDs.

Sender

To set the sender's information, use 103 (T_MESSAGE_FROM) and 109(T_MESSAGE_FROM_UID) related message constants. For more information,see Message constants.

For example,

MyESDK.SetMessageString(MID, ‘Myself’)

MyESDK.SetMessageString(MI D, 109, UID);

Sent

To set the sent date and time, use 106 (T-MESSAGE_SENT) and the datetimethat the message was sent.

For example,

MyESDK. SetMessageDateTime(MID, 106, Now)

Under Microsoft development environments use DateTime.Now.ToOADate toget the correctly formatted date and time.

Subject

To set the subject use 105 (T_MESSAGE_SUBJECT).

For example,

MyESDK. SetMessageString(MID, 1 05,“My Subject”)

Body

The body of a message is a rich text formatted content. To add bodycontent to the message, use the SetMessageBodyAsRTF or theSetMessageBodyAsText methods.

For example,

MyESDK.SetMessageBodyAsRTF(MID, RTF)

Sending the Message

To send the message once it is constructed, call the SetMessage method.

For example,

MyESDK.SetMessage(MID)

Attachments

Attachments are optional and can be included with a message using theSetMessageAttachmentAsFile, SetMessageAttachmentAsStream andSetMessageAttachmentAsOleVariant methods.

Custom properties

Custom message properties allow the user to include unique informationwith any message sent. For more information on custom messageproperties, see How To Create a Custom Message Property.

How to Receive a Message

To receive messages, handle the OnMessage event within the real-timeclient. The OnMessage event is fired whenever a message is received.Message events can occur automatically while connected to a real-timeserver. A message event can also occur manually through the use of theGetMessageRequestAll event.

For example,

Identity=MyESDK.GetMessageString(MID, 103)

RichText.Rtf=MyESDK.GetMessageBodyAsRTF(MI D)

In the above example, the identity of the sender 103 (T_MESSAGE_FROM) isextracted from the incoming message and placed into the variableIdentity. The MID is a parameter to the OnMessage event. The body of themessage is then extracted from the message using the GetMessageBodyAsRTFmethod and placed directly into a RichEdit control visually residing onthe form.

Within the OnMessage event, the optional delivered parameter allows theclient to control the state of the delivery of the message. Thisinformation is logged by the Audit and Reporting add-ons for trackingpurposes and can be used for a variety of purposes related to messagedelivery confirmation. The default value of 2 (T_DELIVERED) instructsthe real-time server than the message was delivered.

Other delivery parameters include:

T_UNDELIVERED=1

The message is undelivered. The message will remain on the server andwill be resent on the next message request;

T_DELIVERED=2

The message is delivered. The delivery is logged and the message ispurged from the real-time server.

T_PERFORMED=3

Not used for messages.

T_DENIED=4

Not used for messages.

T_EXPIRED=5

The message expired instead of being delivered.

How to Receive Status

To receive status, handle the OnStatus event within the real-timeclient. The OnStatus event is fired when an incoming status is received.

For example,

Identity=MyESDK.GetStatusString(UID, 103)

State=MyESDK.GetStatusInteger(UID, 101)

In the above example, the identity 103 (T_STATUS_IDENTITY) is extractedfrom the incoming status and placed into the variable Identity. Thestate 101 (T_STATUS_STI) is then extracted from the incoming status andplaced into the variable State. subsequently use this status informationto populate a buddy list contained within a ListView or TreeView visualcomponent.

Status events can be caused by both manual requests, and automaticstatus requests. GetStatusRequestAll and GetStatusRequestQuery willcause manually status events based upon the requested statusinformation. One status event is generated for each user that matchesthe requested query. The client will be automatically notified with anOnStatus event as a user's status changes provided either use fullstatus mode or by individually requesting status tracking for specificUIDs by calling the GetStatusRequest method. To change from full statemode to partial status mode, see the SetStatusMode method.

How to Create a Custom Status Property

The status properties within the ESDK are completely extensible. Usingthe SetStatusString, SetStatusInteger, SetStatusDateTime andSetStatusBoolean methods custom status properties can be applied to anystatus.

For example,

MyESDK.SetStatusInteger(1 0000,5)

MyESDK.SetStatusString(1 0001,“Data”)

MyESDK.SetStatus

In the above example the status property 10000 is assigned the integervalue of 5 and the status property 10001 is assigned the string value“Data”. Starting any custom status properties at 10000 is recommended.It is important to remember and track the status property values withinthe application and the corresponding data type associated with theproperty. The information can be extracted using the respectiveGetStatusInteger and GetStatusString related methods.

How to Create a Custom Message Property

The message properties within the ESDK are completely extensible. Usingthe SetMessageString, SetMessageInteger, SetMessageBoolean,SetMessageDateTime and SetMessageStream methods, custom messageproperties can be applied to any message.

For example,

MyESDK.SetMessageInteger(MID, 10000,25)

MyESDK 10001,“Hello”)

MyESDK.SetMessage(MID)

In the above example the message property 10000 is assigned the integervalue of 25 and the message property 11000 is assigned the string value“Hello”. Starting any custom message properties at 10000 is recommended.It is important to remember and track the message property values withinthe application and the corresponding data type associated with theproperty. The information can be extracted using the respectiveGetMessageInteger and GetMessageString related methods.

Constants

Status Constants

The following default status constants are predefined within thereal-time client and server. To define custom status properties, see HowTo Create a Custom Status Property. To set any of the following statusproperties, see the SetStatusString, SetStatusInteger andSetStatusDateTime methods. Data Type Value Type Description T_STATUS_MSG100 String Status (“online”, “offline”, “away from desk”, etc)T_STATUS_STI 101 Integer State (1 = online 2 = off- line 3 = dnd, seebelow) T_STATUS_IDENTITY_ 103 Identity (ex: “John Smith”, the displayedname) T_STATUS_LOGON 104 String Network logon name (optional)T_STATUS_MACH 105 String Machine computer name (optional) T_STATUS_PHONE106 String Phone number (optional) T_STATUS_TIME 110 DateTime Laststatus change date and time (optional) T_STATUS_UID 113 String UIDT_STATUS_GROUP 115 String Member of group (optional) T_STATUS_EMAIL 121String Email address (optional) T_STATUS_IP 122 String TCP/IP address(optional) T_STATUS_VERSION 123 String VersionState Values

The following default state values are used in conjunction with thestate integer property:

101 (T_STATUS_STI).

STA_NONE=0;

None. T_MESSAGE_PRIORITY_HIDE 119 Boolean Always hide the messageT_MESSAGE_PRIORITY_SHOW 124 Boolean Always show the messageT_MESSAGE_PRIORITY DEFAULT 125 Boolean Always use preferenceT_MESSAGE_POSITION 126 Boolean Use custom position T_MESSAGE_POSITION_UL127 Integer Upper left T_MESSAGE_POSITION_UR 128 Integer Upper rightT_MESSAGE_POSITION_LL 129 Integer Lower left T_MESSAGE_POSITION_LR 130Integer Lower right T_MESSAGE_POSITION_ 131 Boolean Always CASCADEcascade the message T_MESSAGE_SIZE 132 Boolean Use custom sizeT_MESSAGE_SIZE_WIDTH 133 Integer Width T_MESSAGE_SIZE_HEIGHT 134 IntegerHeight

From the foregoing, it may be seen that the SDK of the present inventionprovides a set of tools for creating comprehensive real-timecommunication applications, such as instant messaging, chat and presenceprograms for business and other applications. The SDK is designed tooperate in most newer development environments, such as those created byBorland and Microsoft.

The SDK of the present invention embeds instant messaging and presencewithin existing business software. The SDK also allows the customizationof instant messaging (IM) solutions for business applications. The SDKalso allows branded OEM products to utilize instant messaging of thepresent invention. The SDK of the present invention also allowsreal-time applications to stream information through the real-timeengine. The SDK also provides web-based instant messaging solutions.

STA_ON=1;

The user is online.

STA_OFF=2;

The user is offline.

STA_DND=3;

The user is in the do not disturb state.

STA_AWAY=4

The user is in the away state.

Message Constants

The following default message constants are predefined within thereal-time client and server. To define custom message properties, seeHow To Create a Custom Message Property. To set any of the followingmessage properties, see the SetMessageString, SetMessageInteger andother related methods. Type Value Data Type Description T_MESSAGE_REPLY100 Boolean Reply is allowed T_MESSAGE_MID 101 String MID T_MESSAGE_FROM103 String Identity of sender (displayed name) T_MESSAGE_SUBJECT 105String Subject T_MESSAGE_SENT 106 DateTime Sent message date and timeT_MESSAGE_BUTTON 107 String Instant reply button captionT_MESSAGE_FROM_UID 109 String UID of sender

The real-time platform provides advanced features, such as comprehensivesecurity and encryption, off-line message delivery, file attachments,auditing features, and archiving and the ability to extend any portionof the real-time architecture to transport custom information. Thereal-time platform has the ability to automatically interconnectmultiple real-time servers together. The transport handles all therouting automatically, as disclosed herein, so interfacing software codeto presence and instant messaging is less difficult to build andmaintain, but is versatile enough to accomplish any real-timerequirement needs.

The SDK, also referred to as ESDK, is completely extensible so thatusers can add information to status and presence or messages, as well asbuild entirely unique solutions, as required. Software programmers canleverage the off-line delivery capability of messages to includesolution specific content.

The real-time transport technology, as disclosed herein, securely andefficiently connects multiple offices together and may route securelyover virtually any TCP connection. The software programmer does not needto worry about how to communicate in real-time to a variety of peoplethat are dispersed geographically, since this is handled automaticallywith the ESDK, as disclosed herein. Users are tracked throughout thereal-time system based upon ESDK server. Real-time channelcommunications are automatically routed to the destination clients overany routed connection to constantly, persisted connections. All statusinformation is automatically propagated throughout the real-time systemover pipes and persistent client connections. A centralized managementconsole allows the user to manage the connections between servers,security, routing, users and multiple groups.

1. A software development kit for enabling a developer to providereal-time communications capabilities to an application program, whichcomprises: means for establishing a connection to a real-time server;means for sending a message; and, means for receiving a message.
 2. Thesoftware development kit as claimed in claim 1, including: means fordisconnecting from a real-time server.
 3. The software development kitas claimed in claim 1, including: means for creating a communicationschannel through a real-time platform associated with said real-timeserver.
 4. The software development kit as claimed in claim 3,including: means for joining a third party user to said communicationschannel.
 5. The software development kit as claimed in claim 3,including: means for deleting a third party user from saidcommunications channel.
 6. The software development kit as claimed inclaim 3, including: means for invoking said communications channel. 7.The software development kit as claimed in claim 3, including: means fordestroying said communications channel.
 8. The software development kitas claimed in claim 1, including: means for announcing status to saidreal-time server.
 9. The software development kit as claimed in claim 1,including: means for requesting third party user status from saidreal-time server.